@import './var.less';

:root {
  --rv-badge-size: @badge-size;
  --rv-badge-color: @badge-color;
  --rv-badge-padding: @badge-padding;
  --rv-badge-font-size: @badge-font-size;
  --rv-badge-font-weight: @badge-font-weight;
  --rv-badge-border-width: @badge-border-width;
  --rv-badge-background-color: @badge-background-color;
  --rv-badge-dot-color: @badge-dot-color;
  --rv-badge-dot-size: @badge-dot-size;
  --rv-badge-font-family: @badge-font-family;
}

.@{rv-prefix}-badge {
  display: inline-block;
  box-sizing: border-box;
  min-width: var(--rv-badge-size);
  padding: var(--rv-badge-padding);
  color: var(--rv-badge-color);
  font-weight: var(--rv-badge-font-weight);
  font-size: var(--rv-badge-font-size);
  font-family: var(--rv-badge-font-family);
  line-height: 1.2;
  text-align: center;
  background-color: var(--rv-badge-background-color);
  border: var(--rv-badge-border-width) solid var(--rv-white);
  border-radius: var(--rv-border-radius-max);

  &--fixed {
    position: absolute;
    top: 0;
    right: 0;
    transform: translate(50%, -50%);
    transform-origin: 100%;
  }

  &--dot {
    width: var(--rv-badge-dot-size);
    min-width: 0;
    height: var(--rv-badge-dot-size);
    background-color: var(--rv-badge-dot-color);
    border-radius: 100%;
  }

  &__wrapper {
    position: relative;
    display: inline-block;
  }
}
